package com.tang.thepath.model;

import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.util.List;

public class RequestModel {


    public static class Empty{

    }


    //登录
    public static class LoginRequest implements Serializable {

        @SerializedName("email")
        public String loginId;

        @SerializedName("password")
        public String password;
    }

    public static class LoginResponse implements Serializable{

        @SerializedName("token")
        public String token;

        @SerializedName("role")
        public int role;

        @SerializedName("level")
        public int level;

        @SerializedName("member_id")
        public int memberId;

        @SerializedName("expired")
        public int expired;

    }


    //上报地理位置
    public static class ReportPositionRequest implements Serializable{

        @SerializedName("outsign_id")
        public int outsignId;

        @SerializedName("longitude")
        public double longitude;

        @SerializedName("latitude")
        public double latitude;

        @SerializedName("record_time")
        public long recordTime;

    }

    public static class ReportPositionResponse implements Serializable {
        @SerializedName("id")
        public int id;
    }



    //上传文件
    public static class UploadResponse implements Serializable{

        @SerializedName("path_list")
        public List<String> pathList;

    }

    //客户信息上报
    public static class StoreCustomRequest implements Serializable{

        @SerializedName("outsign_id")
        public int outsignId;

        @SerializedName("image_array")
        public List<String> images;

        @SerializedName("company_name")
        public String companyName;

        @SerializedName("address")
        public String address;

        @SerializedName("contact")
        public String contact;

        @SerializedName("position")
        public String position;

        @SerializedName("mobile")
        public String mobile;
    }

    public static class StoreCustomResponse implements Serializable{

        @SerializedName("id")
        public int id;
    }

    public static class ListCustomRequest implements Serializable{

        @SerializedName("page")
        public int page;
    }

    public static class CustomInfo implements Serializable{

        @SerializedName("id")
        public int id;

        @SerializedName("outsign_id")
        public int outsignId;

        @SerializedName("member_id")
        public int memberId;

        @SerializedName("image_array")
        public List<String> images;

        @SerializedName("company_name")
        public String companyName;

        @SerializedName("address")
        public String address;

        @SerializedName("contact")
        public String contact;

        @SerializedName("position")
        public String position;

        @SerializedName("mobile")
        public String mobile;

        @SerializedName("up_name")
        public String upName;

        @SerializedName("created_at")
        public String createdAt;

        @SerializedName("updated_at")
        public String updatedAt;
    }
    public static class ListCustomResponse implements Serializable{

        @SerializedName("data")
        public List<RequestModel.CustomInfo> customInfoList;
    }



    //销售信息上报
    public static class StoreSoldInfoRequest implements Serializable{

        @SerializedName("custom_id")
        public int customId;

        @SerializedName("name")
        public String name;

        @SerializedName("image_array")
        public List<String> images;

        @SerializedName("information")
        public String information;

        @SerializedName("longitude")
        public double longitude;

        @SerializedName("latitude")
        public double latitude;
    }

    public static class StoreSoldInfoResponse implements Serializable{
        @SerializedName("id")
        public int id;
    }

    public static class Visit implements Serializable{
        @SerializedName("id")
        public int id;

        @SerializedName("member_id")
        public int memberId;

        @SerializedName("contact")
        public String contact;

        @SerializedName("treatplan")
        public String treatplan;

        @SerializedName("howmany")
        public int howmany;

        @SerializedName("company")
        public String company;

        @SerializedName("up_name")
        public String upName;

        @SerializedName("created_at")
        public String createdAt;

        @SerializedName("updated_at")
        public String updatedAt;
    }

    public static class ListVisitResponse implements Serializable{

        @SerializedName("data")
        public List<Visit> visitList;
    }

    //上报拜访记录
    public static class StoreVisitRequest implements Serializable{

        @SerializedName("contact")
        public String contact;

        @SerializedName("howmany")
        public int howmany;

        @SerializedName("treatplan")
        public String treatplan;

        @SerializedName("company")
        public String company;
    }

    public static class StoreVisitResponse implements Serializable{
        @SerializedName("id")
        public int id;
    }




    public static class User implements Serializable{

        @SerializedName("id")
        public int id;

        @SerializedName("name")
        public String name;

        @SerializedName("email")
        public String email;

        @SerializedName("level")
        public int level;

        @SerializedName("role")
        public int role;

        @SerializedName("power_range")
        public String powerRange;
    }
    //人员名单查看功能
    public static class ListUserRequest implements Serializable{

        @SerializedName("level")
        public int level;
    }

    public static class ListUserResponse implements Serializable{

        @SerializedName("data")
        public List<User> userList;
    }

    public static class Repair implements Serializable{
        @SerializedName("id")
        public int id;

        @SerializedName("member_id")
        public int memberId;

        @SerializedName("company_name")
        public String companyName;

        @SerializedName("address")
        public String address;

        @SerializedName("contact")
        public String contact;

        @SerializedName("issue_title")
        public String issueTitle;

        @SerializedName("reason")
        public String reason;

        @SerializedName("car_model")
        public String carModel;

        @SerializedName("sale_time")
        public String saleTime;

        @SerializedName("image_array")
        public List<String> images;

        @SerializedName("after_image")
        public List<String> afterImages;

        @SerializedName("up_name")
        public String upName;

        @SerializedName("created_at")
        public String createdAt;

        @SerializedName("updated_at")
        public String updatedAt;
    }
    public static class ListRepairResponse implements Serializable{

        @SerializedName("data")
        public List<RequestModel.Repair> repairList;
    }
    public static class SaveRepairRequest implements Serializable{
        @SerializedName("company_name")
        public String companyName;

        @SerializedName("address")
        public String address;

        @SerializedName("contact")
        public String contact;

        @SerializedName("issue_title")
        public String issueTitle;

        @SerializedName("reason")
        public String reason;

        @SerializedName("car_model")
        public String carModel;

        @SerializedName("sale_time")
        public long saleTime;

        @SerializedName("image_array")
        public List<String> images;
    }
    public static class UpdateRepairRequest implements Serializable{

        @SerializedName("after_image")
        public List<String> afterImages;

        @SerializedName("id")
        public int id;
    }

    public static class SaveRepairResponse implements Serializable{
        @SerializedName("id")
        public int id;
    }


    public static class Problem implements Serializable{

        @SerializedName("id")
        public int id;

        @SerializedName("title")
        public String title;

        @SerializedName("content")
        public String content;

        @SerializedName("created_at")
        public String createdAt;

        @SerializedName("updated_at")
        public String updatedAt;
    }

    public static class SaveProblemRequest implements Serializable{

        @SerializedName("title")
        public String title;

        @SerializedName("content")
        public String content;
    }

    public static class ListProblemResponse implements Serializable{

        @SerializedName("data")
        public List<Problem> problemList;
    }

    public static class IdResponse implements Serializable{

        @SerializedName("id")
        public int id;
    }

    public static class ChangePasswordRequest implements Serializable{

        @SerializedName("old_password")
        public String oldPassword;

        @SerializedName("password")
        public String password;
    }

}
